﻿<%@ Page Language="C#" MasterPageFile="~/YUIAspNet.Master" AutoEventWireup="true" CodeBehind="ButtonTypeMenu.aspx.cs" Inherits="YUIAspNetDemo.Button.ButtonTypeMenu" Title="Untitled Page" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
    <title>YUIAsp.Net Controls : LiveDemo : Button : Menu Button</title>
    <style type="text/css">
        .customCssItem {background-color:Gray;}
        .customCssItem a {color:Lime}
    </style>
    
    <script type="text/javascript">
        function tell(sender, args) {
            alert(args.item.text);
            args.cancel = true;
        }
    </script>
</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <h1>Menu button</h1>
    
    <p>Menu display of the button is similar to the split one, only difference is the user doesn't have the primary option.</p>
    
    <p>
    <yui:Button ID="btnSplit" EnableAnimation="true" Text="<i>Here is a </i> <b>menu</b> button" ButtonType="Menu" runat="server">
        <ButtonMenu runat="server">
            <Items>
                <yui:MenuItem Text="Custom script" Value="0" OnClientClick="tell" />
                <yui:MenuItem Text="Option 1" Value="1" />
                <yui:MenuItem Text="Option 2 - no postback" AutoPostback="false" Value="2" />
                <yui:MenuItem Text="Checked item" Value="3" Checked="true" />
                <yui:MenuItem Text="Selected item" Value="4" Selected="true" />
                <yui:MenuItem Text="Disabled item" Value="5" Enabled="false" />
                <yui:MenuItem Text="YUIAsp.Net link" Target="_blank" NavigateUrl="http://YUIAsp.Net" />
                <yui:MenuItem Text="Custom css class" Value="6" CssClass="customCssItem" />
                <yui:MenuItem Text="With childs">
                    <Items>
                        <yui:MenuItem Text="sub-Option 1" Value="1.1" />
                        <yui:MenuItem Text="sub-Option 2" Value="1.2">
                            <Items>
                                <yui:MenuItem Text="sub-sub-Option 1" Value="1.1.1" />
                                <yui:MenuItem Text="sub-sub-Option 2" Value="1.1.2">
                                    <Items>
                                        <yui:MenuItem Text="sub-sub-sub-Option 1" Value="1.1.1.1" />
                                    </Items>
                                </yui:MenuItem>
                            </Items>
                        </yui:MenuItem>
                    </Items>
                </yui:MenuItem>
                
            </Items>
        </ButtonMenu>
    </yui:Button>
    <br />
    <asp:Label ID="lblPost" runat="server"></asp:Label>
    </p>
</asp:Content>